class Type {
  static isNumber(value) {
    return Object.prototype.toString.call(value) === '[object Number]' && Number.isNaN(value) === false;
  }

  static isInteger(value) {
    return Number.isInteger(value);
  }

  static isNaN(value) {
    return Number.isNaN(value);
  }

  static isString(value) {
    return Object.prototype.toString.call(value) === '[object String]';
  }

  static isNull(value) {
    return value === null;
  }

  static isDate(value) {
    return Object.prototype.toString.call(value) === '[object Date]';
  }

  static isArray(value) {
    return Object.prototype.toString.call(value) === '[object Array]';
  }

  static isFunction(value) {
    return Object.prototype.toString.call(value) === '[object Function]' || Object.prototype.toString.call(value) === '[object AsyncFunction]';
  }
}

module.exports = Type;